package com.southwind.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.southwind.entity.Goods;
import com.southwind.servise.GoodsService;

@RestController
@RequestMapping("/goods")
public class GoodsController {
	@Autowired
	GoodsService service;
	//根据id查询good（商品） 和被谁购买customer 
	@RequestMapping("/findById/{id}")
		public Goods findById(@PathVariable("id") long id) {
			return service.findById(id);
		}

}
